package edu.sctu.zcy.month201505.day20150526.homeworkchen_v2;

/**
 * Created by user24 on 2015/5/29.
 */
public class DiningRoom {

    public Window[] windows = new Window[3];
    public int[] seat = new int[30];

    public DiningRoom() {

        Dish[] foods = new Dish[3];
        for (int i = 0; i < windows.length; i++) {


                Window window = new Window();
                Dish food = new Dish();

                food.name = "鱼香茄子"+i;
                food.price =  7+i;

                window.windowNumber = i + 2;
                window.queuePeopleNumber = 5+i;

                windows[i] = window;
                foods[i] = food;

                windows[i].foods = foods;
        }
    }

    public void isConsume(){



    }

    public int getSeat(){

        for (int i = 0; i < seat.length/2; i++) {
            seat[i] = 0;//表示无人
            seat[i+1] = 1;//表示有人
        }
        return seat[(int)(Math.random()*seat.length)];
    }
}
